package pres.lnk.learn.designpattern.r_mediator;

/**
 * <p>中介者模式</p>
 * 当有多个业务类互相调用时，提供一个中介者类，各个业务类之间的通信通过中介者交互，降低业务类之间的偶合性。
 * @Author lnk
 * @Date 2018/6/4
 */
public class Main {
    public static void main(String[] args) {
        BusinessA a = new BusinessA();
        BusinessB b = new BusinessB();
        AbstractMediator mediator = new Mediator(a, b);
        a.execute(mediator);
        b.execute(mediator);
    }
}
